﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MySql.Data.MySqlClient;

/// <summary>
/// Descripción breve de PlanDA
/// </summary>
public class PlanDA
{
	public static DataTable BuscarPlan()
    {
        MySqlConnection conexion = Conexion.obtConexion();
        DataTable tabla = new DataTable("tabla");
        string consulta = @"SELECT `planes`.`planid` AS `ID`, `planes`.`plandesc` AS `Nombre`
        FROM `planes`";
        MySqlCommand comando = new MySqlCommand(consulta, conexion);
        conexion.Open();
        MySqlDataReader dataReader = comando.ExecuteReader();
        tabla.Load(dataReader,LoadOption.OverwriteChanges);
        conexion.Close();
        return tabla;
    }


}
